<template>
    <div class="about">
        <p>{{ aaa }}</p>
        <p>{{ bbb }}</p>
        <button @click="fun1">fun1</button>
        <p>{{ ccc }}</p>
    </div>
</template>
<script>
    let _this
	import { defineComponent, toRefs, ref, reactive, getCurrentInstance } from 'vue'
import { createLogger } from 'vuex';
	export default defineComponent({
		setup(){
            let { proxy: _this } = getCurrentInstance(); //获取上下文实例，ctx=vue2的this
            let data = toRefs(reactive({
                aaa: 111,
                bbb: {
                    b1: 'b11111',
                    b2: 'b222222'
                },
                ccc: ''
            }))
            let methods = {
                fun1: function(){
                    console.log( this.bbb, _this );
					_this.ccc++
                },
            }
            
            return{
                ...data,
                ...methods
            }
        }
	})
</script>
